package com.motherchild.user.mapper;
import com.motherchild.user.dto.ShippingAddressDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ShippingAddressMapper {
    List<ShippingAddressDTO> selectAddressesByUserId(@Param("userId") Long userId); // 根据用户ID获取地址列表
    void insertAddress(ShippingAddressDTO addressDTO); // 添加收货地址
    void updateAddress(ShippingAddressDTO addressDTO); // 更新收货地址
    void deleteAddress(Long id); // 删除收货地址
    ShippingAddressDTO selectAddressById(Long id); // 根据ID获取收货地址
}